﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;

namespace AcesHigh
{
    public enum Suit { Clubs=1, Spades, Hearts, Diamonds };
    public enum Rank { Two=1, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, Ace };

    public class Card
    {
        private Rank rank;
        private Suit suit;

        public Card(Rank rank, Suit suit)
        {
            this.Suit = suit;
            this.Rank = rank;
        }

        internal Rank Rank
        {
            get { return this.rank; }
            set { this.rank = value; }
        }

        internal Suit Suit
        {
            get { return suit; }
            set { suit = value; }
        }
 
       

        override public String ToString()
        {
            return String.Format("{0} of {1}", rank, suit);
        }

        public bool IsLowerValue(Card card)
        {
            if (card == null) return false;

            return ((this.suit == card.suit) && (this.rank < card.rank));
          
        }
    }
}
